-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(comp:checkbox,comp:radio): add group vertical props #975
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## main #975 +/- ##
==========================================
- Coverage 92.79% 92.53% -0.26%
==========================================
Files 703 706 +3
Lines 68808 69024 +216
Branches 8040 8045 +5
==========================================
+ Hits 63848 63874 +26
- Misses 4960 5150 +190
Continue to review full report at Codecov.
|
@@ -58,7 +59,7 @@ export default defineComponent({ | |||
} | |||
return ( | |||
<div class={classes.value} style={style.value}> | |||
{children} | |||
<IxSpace vertical={vertical}>{children}</IxSpace> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<IxSpace vertical={vertical}>{children}</IxSpace> | |
{vertical ? <IxSpace vertical={true}>{children}</IxSpace> : {children}} |
否则会影响 gap 功能,radio 也这样改下。
'onUpdate:checked': { type: Function as PropType<(checked: CheckValue) => void> }, | ||
onChange: { type: Function as PropType<(newChecked: CheckValue, oldChecked: CheckValue) => void> }, | ||
onBlur: { type: Function as PropType<(evt: FocusEvent) => void> }, | ||
onFocus: { type: Function as PropType<(evt: FocusEvent) => void> }, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} as const 一下 |
radio 也一样
onFocus: IxPropTypes.emit<(evt: FocusEvent) => void>(), | ||
'onUpdate:checked': { type: Function as PropType<(checked: CheckValue) => void> }, | ||
onChange: { type: Function as PropType<(newChecked: CheckValue, oldChecked: CheckValue) => void> }, | ||
onBlur: { type: Function as PropType<(evt: FocusEvent) => void> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onBlur: { type: Function as PropType<(evt: FocusEvent) => void> }, | |
onBlur: { type: [Function, Array ]as PropType<MaybeArray<(evt: FocusEvent) => void>> }, |
其他的事件类型也一并改下。
71af197
to
4402459
Compare
4402459
to
d81b99f
Compare
refactor(comp:radio,checkbox): props replace to vue proptype
PR Checklist
Please check if your PR fulfills the following requirements:
What is the current behavior?
What is the new behavior?
RadioGroupProps/CheckBoxGroupProps
vertical
boolean
true
为垂直排列Other information